package org.lq.dlz.web;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.lq.dlz.dao.CategoryDao;
import org.lq.dlz.service.CategoryService;
import org.lq.dlz.service.impl.CategoryServiceImpl;

/**
 * Servlet implementation class finalProductServlet
 */
@WebServlet("/finalProductServlet.do")
public class finalProductServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public finalProductServlet() {
        super();
        // TODO Auto-generated constructor stub
    }
    private CategoryService categoryservice = new CategoryServiceImpl();
	/**
	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		response.setCharacterEncoding("utf-8");
		request.setCharacterEncoding("utf-8");
		String method = request.getParameter("method");
		switch (method) {
		case "initCateList":
			initCateList(request,response);
			break;

		default:
			break;
		}
	}
	//初始化商品页面的商品分类-下拉列表，用于查找商品使用
	private void initCateList(HttpServletRequest request, HttpServletResponse response) {
		
	}

	/**
	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
